<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Chapter 1. The Variadic Macro Data Library 1.10</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Chapter 1. The Variadic Macro Data Library 1.10">
<link rel="next" href="variadic_macro_data/vmd_naming.html" title="Naming conventions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="variadic_macro_data/vmd_naming.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="variadic_macro_data"></a>Chapter 1. The Variadic Macro Data Library 1.10</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Edward</span> <span class="surname">Diener</span>
</h3></div></div>
<div><p class="copyright">Copyright © 2010-2017 Tropic Software
      East Inc</p></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="index.html#variadic_macro_data.vmd_intro">Introduction</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_naming.html">Naming conventions</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_whyhow.html">Why and how to use</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vmacros.html">Using variadic macros</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vc.html">Visual C++ define</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_detail.html">Functional groups</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_data_types.html">Data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html">Macros for working
    with data types</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific">Specific
      macros for working with data types</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_test_empty">Emptiness</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_constraints">Macro
        constraints</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_identifier">Identifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_number">Numbers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_type">Types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_pp_data_types">VMD
        and Boost PP data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_identifying">Identifying
        macros and BOOST_VMD_IS_EMPTY</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic.html#variadic_macro_data.vmd_specific_generic.vmd_specific.vmd_sptable">Summing
        up the specific VMD macros</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic.html">Generic
      macros for working with data types</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic.html#variadic_macro_data.vmd_specific_generic.vmd_generic.vmd_sequence">Parsing
        sequences</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic.html#variadic_macro_data.vmd_specific_generic.vmd_generic.vmd_sequence.vmd_sequence_convert">Converting
          sequences</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic.html#variadic_macro_data.vmd_specific_generic.vmd_generic.vmd_sequence.vmd_sequence_access">Accessing
          a sequence element</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic/vmd_convert_sequence.html">Getting
        the type of data</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic/vmd_equality.html">Testing
        for equality and inequality</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_specific_generic/vmd_generic/vmd_gnctable.html">Summing
        up the generic macros</a></span></dt>
</dl></dd>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html">Macros with modifiers</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers.html#variadic_macro_data.vmd_modifiers.vmd_modifiers_return_type">Return
      type modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_filter.html">Filtering
      modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_identifier.html">Identifier
      modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_splitting.html">Splitting
      modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_index.html">Index
      modifiers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_modifiers/vmd_modifiers_single.html">Modifiers
      and the single-element sequence</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_identifier_subtype.html">Identifier
    subtypes</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html">Useful variadic macros
    not in Boost PP</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful.html#variadic_macro_data.vmd_useful.vmd_assert">Asserting
      and data types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_identity.html">Generating
      emptiness and identity</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_useful/vmd_empty_ppdata.html">Functionality
      for "empty" seqs and tuples</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_internal_macro.html">Controlling internal
    usage</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_reentrant.html">Boost PP re-entrant
    versions</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_dynamic_typing.html">Input as dynamic
    types</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_vc_isms.html">Visual C++ gotchas in
    VMD</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_conv.html">Version 1.7 to 1.8 conversion</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_examples.html">Examples using VMD functionality</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data_reference.html">Variadic Macro Data Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="variadic_macro_data_reference.html#header.boost.vmd.assert_hpp">Header &lt;boost/vmd/assert.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_array_hpp.html">Header &lt;boost/vmd/assert_is_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_empty_hpp.html">Header &lt;boost/vmd/assert_is_empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_identifier_hpp.html">Header &lt;boost/vmd/assert_is_identifier.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_list_hpp.html">Header &lt;boost/vmd/assert_is_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_number_hpp.html">Header &lt;boost/vmd/assert_is_number.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_seq_hpp.html">Header &lt;boost/vmd/assert_is_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_tuple_hpp.html">Header &lt;boost/vmd/assert_is_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/assert_is_type_hpp.html">Header &lt;boost/vmd/assert_is_type.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/elem_hpp.html">Header &lt;boost/vmd/elem.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/empty_hpp.html">Header &lt;boost/vmd/empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/enum_hpp.html">Header &lt;boost/vmd/enum.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/equal_hpp.html">Header &lt;boost/vmd/equal.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/get_type_hpp.html">Header &lt;boost/vmd/get_type.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/identity_hpp.html">Header &lt;boost/vmd/identity.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_array_hpp.html">Header &lt;boost/vmd/is_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_empty_hpp.html">Header &lt;boost/vmd/is_empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_empty_array_hpp.html">Header &lt;boost/vmd/is_empty_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_empty_list_hpp.html">Header &lt;boost/vmd/is_empty_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_general_identifier_hpp.html">Header &lt;boost/vmd/is_general_identifier.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_identifier_hpp.html">Header &lt;boost/vmd/is_identifier.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_list_hpp.html">Header &lt;boost/vmd/is_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_multi_hpp.html">Header &lt;boost/vmd/is_multi.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_number_hpp.html">Header &lt;boost/vmd/is_number.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_parens_empty_hpp.html">Header &lt;boost/vmd/is_parens_empty.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_seq_hpp.html">Header &lt;boost/vmd/is_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_tuple_hpp.html">Header &lt;boost/vmd/is_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_type_hpp.html">Header &lt;boost/vmd/is_type.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/is_unary_hpp.html">Header &lt;boost/vmd/is_unary.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/not_equal_hpp.html">Header &lt;boost/vmd/not_equal.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/is_vmd_seq_hpp.html">Header &lt;boost/vmd/seq/is_vmd_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/pop_back_hpp.html">Header &lt;boost/vmd/seq/pop_back.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/pop_back_hpp.html">Header &lt;boost/vmd/tuple/pop_back.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/pop_front_hpp.html">Header &lt;boost/vmd/seq/pop_front.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/pop_front_hpp.html">Header &lt;boost/vmd/tuple/pop_front.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/push_back_hpp.html">Header &lt;boost/vmd/seq/push_back.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/push_back_hpp.html">Header &lt;boost/vmd/tuple/push_back.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/push_front_hpp.html">Header &lt;boost/vmd/seq/push_front.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/push_front_hpp.html">Header &lt;boost/vmd/tuple/push_front.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/remove_hpp.html">Header &lt;boost/vmd/seq/remove.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/remove_hpp.html">Header &lt;boost/vmd/tuple/remove.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/size_hpp.html">Header &lt;boost/vmd/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/size_hpp.html">Header &lt;boost/vmd/seq/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/size_hpp.html">Header &lt;boost/vmd/tuple/size.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_array_hpp.html">Header &lt;boost/vmd/to_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/to_array_hpp.html">Header &lt;boost/vmd/seq/to_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/to_array_hpp.html">Header &lt;boost/vmd/tuple/to_array.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_list_hpp.html">Header &lt;boost/vmd/to_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/to_list_hpp.html">Header &lt;boost/vmd/seq/to_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/to_list_hpp.html">Header &lt;boost/vmd/tuple/to_list.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_seq_hpp.html">Header &lt;boost/vmd/to_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/array/to_seq_hpp.html">Header &lt;boost/vmd/array/to_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/list/to_seq_hpp.html">Header &lt;boost/vmd/list/to_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/to_seq_hpp.html">Header &lt;boost/vmd/tuple/to_seq.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/to_tuple_hpp.html">Header &lt;boost/vmd/to_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/array/to_tuple_hpp.html">Header &lt;boost/vmd/array/to_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/list/to_tuple_hpp.html">Header &lt;boost/vmd/list/to_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/seq/to_tuple_hpp.html">Header &lt;boost/vmd/seq/to_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/vmd/tuple/is_vmd_tuple_hpp.html">Header &lt;boost/vmd/tuple/is_vmd_tuple.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
</dl></dd>
<dt><span class="section"><a href="variadic_macro_data/vmd_design.html">Design</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_compilers.html">Compilers</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_history.html">History</a></span></dt>
<dt><span class="section"><a href="variadic_macro_data/vmd_ack.html">Acknowledgements</a></span></dt>
<dt><span class="section"><a href="index/s23.html">Index</a></span></dt>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="variadic_macro_data.vmd_intro"></a><a class="link" href="index.html#variadic_macro_data.vmd_intro" title="Introduction">Introduction</a>
</h2></div></div></div>
<p>
      Welcome to the Variadic Macro Data library.
    </p>
<p>
      The Variadic Macro Data library, referred to hereafter as VMD for short, is
      a library of variadic macros which provide enhancements to the functionality
      in the Boost preprocessor library ( Boost PP ), especially as it relates to
      preprocessor data types.
    </p>
<p>
      In the Boost PP library the preprocessor data types which have specific functionality
      are numbers ( values between 0 and BOOST_PP_LIMIT_MAG) and the composite data
      types Boost PP arrays, Boost PP lists, Boost PP seqs, and Boost PP tuples.
    </p>
<p>
      The preprocessor data types with which VMD has specific functionality are the
      same data types as the Boost PP library as well as these other preprocessor
      data types: emptiness, VMD identifiers, VMD types ( a subset of identifiers
      ), and VMD sequences, which is another composite data type. A sequence is zero
      or more of any of the other preprocessor data types, other than emptiness,
      which have been previously mentioned and supported by the VMD library, sequentially
      following each other.
    </p>
<p>
      The VMD library does not replicate in any way the functionality of the Boost
      PP data types, but does extend some of that functionality in various ways,
      along with also providing specific functionality for emptiness, VMD identifiers,
      VMD types, and VMD sequences.
    </p>
<h4>
<a name="variadic_macro_data.vmd_intro.h0"></a>
      <span class="phrase"><a name="variadic_macro_data.vmd_intro.data_type_examples"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.data_type_examples">Data
      type examples</a>
    </h4>
<div class="table">
<a name="variadic_macro_data.vmd_intro.dwe"></a><p class="title"><b>Table 1.1. Data types with examples</b></p>
<div class="table-contents"><table class="table" summary="Data types with examples">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
              <p>
                Type
              </p>
            </th>
<th>
              <p>
                Example
              </p>
            </th>
</tr></thead>
<tbody>
<tr>
<td>
              <p>
                identifier
              </p>
            </td>
<td>
              <p>
                anyname
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                number
              </p>
            </td>
<td>
              <p>
                47
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                type
              </p>
            </td>
<td>
              <p>
                BOOST_VMD_TYPE_NUMBER
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                array
              </p>
            </td>
<td>
              <p>
                (4,(an_identifier,156,BOOST_VMD_TYPE_IDENTIFIER))
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                list
              </p>
            </td>
<td>
              <p>
                (78,(some_identifier,(BOOST_VMD_TYPE_TYPE,BOOST_PP_NIL)))
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                seq
              </p>
            </td>
<td>
              <p>
                (identifier)(89)(245)
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                tuple
              </p>
            </td>
<td>
              <p>
                (any_id,175,BOOST_VMD_TYPE_LIST,happy,21)
              </p>
            </td>
</tr>
<tr>
<td>
              <p>
                sequence
              </p>
            </td>
<td>
              <p>
                tree 59 (56,BOOST_VMD_TYPE_SEQ) (128)(fire)(clown) (47,(BOOST_VMD_TYPE_TUPLE,BOOST_PP_NIL))
              </p>
            </td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break"><h4>
<a name="variadic_macro_data.vmd_intro.h1"></a>
      <span class="phrase"><a name="variadic_macro_data.vmd_intro.emptiness"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.emptiness">Emptiness</a>
    </h4>
<p>
      Often we speak of a macro expanding to nothing or being passed nothing as an
      argument. Instead of the term "nothing", which can mean many things
      in general in C++ programming terms, we will call this facility of the preprocessor
      "emptiness".
    </p>
<p>
      Emptiness is the lack of any preprocessing tokens. A macro which expands to
      nothing, as in:
    </p>
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">RETURN_NOTHING</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span>
</pre>
<p>
      is said to return emptiness. Conversely a macro which could accept nothing
      when invoked, such as in:
    </p>
<pre class="programlisting"><span class="identifier">RETURN_NOTHING</span><span class="special">()</span>
</pre>
<p>
      is said to accept emptiness, or no preprocxessing tokens.
    </p>
<p>
      Finally emptiness can be part of any composite data type as in:
    </p>
<pre class="programlisting"><span class="special">(</span><span class="number">45</span><span class="special">,,</span><span class="identifier">some_name</span><span class="special">)</span>
</pre>
<p>
      where the second Boost PP tuple element is empty.
    </p>
<h4>
<a name="variadic_macro_data.vmd_intro.h2"></a>
      <span class="phrase"><a name="variadic_macro_data.vmd_intro.what_is_the_advantage_to_using_t"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.what_is_the_advantage_to_using_t">What
      is the advantage to using the VMD library ?</a>
    </h4>
<p>
      In the Boost PP library a good deal of functionality centers upon manipulating
      Boost PP numbers, and particularly the Boost PP numbers of 0 and 1 as a boolean
      value on which you can use Boost PP preprocessing logic to take different preprocessing
      paths when writing a macro. In other words when using Boost PP the logic of
      a macro is often based on the value of a Boost PP number. This is because Boost
      PP numbers can be compared to each other for equality or inequality, among
      other types of comparison, and Boost PP macros which use this ability to compare
      Boost PP numbers, such as the Boost PP macros BOOST_PP_IF or BOOST_PP_IIF,
      can choose different macro expansion paths based on the results of such a comparison.
    </p>
<p>
      The Boost VMD library adds to the comparison of Boost PP numbers the ability
      to compare any of its other data types for equality or inequality, therefore
      allowing the logic of a macro to depend on the value of any of the preprocessor
      data types it supports.
    </p>
<p>
      Even more signficantly the Boost VMD library has the ability to discover the
      type of preprocessing data if that data is one of the data types the VMD library
      supports, which gives the end-user not only the ability to change the macro
      expansion logic based on the value of a supported data type but also based
      on the actual type of preprocessing data.
    </p>
<p>
      The ability to determining macro expansion based on the type of a macro argument
      allows the macro programmer to create a single macro which expands differently
      based on the type of preprocessing data of one or more of its arguments, as
      well as the value of an argument of a particular type. This allows macro logic
      to be designed in a more flexible way, relying on the type of data and/or the
      value of the data. If this intrigues you, continue reading to understand how
      you can use VMD to do macro programming.
    </p>
<h4>
<a name="variadic_macro_data.vmd_intro.h3"></a>
      <span class="phrase"><a name="variadic_macro_data.vmd_intro.functionality_areas"></a></span><a class="link" href="index.html#variadic_macro_data.vmd_intro.functionality_areas">Functionality
      areas</a>
    </h4>
<p>
      The functionality of the library may be summed up as:
    </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
          Provide a better way of testing for and using empty parameters and empty
          preprocessor data.
        </li>
<li class="listitem">
          Provide ways for testing/parsing for VMD identifiers, Boost PP numbers,
          VMD types, Boost PP tuples, Boost PP arrays, Boost PP lists, and Boost
          PP seqs.
        </li>
<li class="listitem">
          Provide ways for testing/parsing VMD sequences of VMD identifiers, Boost
          PP numbers, VMD types, Boost PP tuples, Boost PP arrays, Boost PP lists,
          and Boost PP seqs.
        </li>
<li class="listitem">
          Provide some useful variadic only macros not in Boost PP.
        </li>
</ol></div>
<p>
      The library is a header only library and all macros in the library are included
      by a single header, whose name is 'vmd.hpp'. Individual headers may be used
      for different functionality in the library and will be denoted when that functionality
      is explained.
    </p>
<p>
      All the macros in the library begin with the sequence 'BOOST_VMD_' to distinguish
      them from other macros the end-user might use. Therefore the end-user should
      not use any C++ identifiers, whether in macros or otherwise, which being with
      the sequence 'BOOST_VMD_'.
    </p>
<p>
      Use of the library is only dependent on Boost PP. The library also uses Boost
      detail lightweight_test.hpp for its own tests.
    </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: August 05, 2021 at 09:45:10 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="variadic_macro_data/vmd_naming.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
</body>
</html>
